import Vue from 'vue'
import VueI18n from 'vue-i18n'
import elementZH from 'element-ui/lib/locale/lang/zh-CN' // 引入自定义中文包
import elementEH from 'element-ui/lib/locale/lang/en' // 引入自定义英文包
import customZH from './zh'
import customEN from './en'
Vue.use(VueI18n)
export default new VueI18n({
  locale: localStorage.getItem('lang') || 'zh',
  messages: {
    zh: {
      morning: '早上好',
      goodDat: '祝你开心每一天',
      ...customZH,
      ...elementZH
    },
    en: {
      morning: 'GooD Morning',
      goodDat: 'Have a nice day',
      ...customEN,
      ...elementEH
    }
  }
})
